package cn.com.onlinetool.jt809.gsafety;

import cn.com.onlinetool.jt809.util.ByteArrayUtil;

import java.nio.charset.Charset;

/**
 * @author xiaodonghong
 * @description TODO
 * @date 2023/6/15-16:28
 */
public class ByteDemo {
    public static void main(String[] args) {
        String abc ="5b0000005a020000006912000000000b1000000000000000b8d3423633323635000000000000000000000000000212020000002400070c07e20e223806d7dc4d0185820f005200000079a079015006c2000c000300000000bcfd5d";
        System.out.println(abc.length());

        String st809 ="5B0000009D09D93DF31400000027560100000000000000CBD544425933353900000000000000000000000000021402000000670101340000000064810383323835315F32303233303630383036323430335F70320000000000000000000006C5CBB6ABC9C11233323037323331393830303132363334313300071C27BC020B47E0000000000000020000000ED6D5B6CBD6F7B5E7D4B4B5F4B5E74E015D";
        System.out.println(st809.length());

        byte[] message =  ByteArrayUtil.hexStr2Bytes("5B000000480000005210010001E24001000100000000000001E2407465737438303900312E37312E3132392E32303100000000000000000000000000000000000000004E8ED9BA5D");
        System.out.println(message);
        System.out.println(message);
        new String(message, Charset.forName("GBK"));
    }
}
